<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>元素的显示模式</title>
    <style>
        div {
            width: 400px;
            height: 200px;
            border: 2px solid red;
            /* 块级元素：允许设置宽高，竖着排 */
            display: block;
        }
        span {
            border: 3px dotted blue;
            /* 行内元素：不允许设置宽高，横着排 */
            display: inline;
            display: block;/* 可以修改元素的显示模式 */
        }
        input,button {
            width: 60px;
            height: 30px;
            /* 行内块元素：允许设置宽高，横着排 */
            display: inline-block;
        }
        .d3 {
            /* 隐藏元素 */
            display: none;
        }
    </style>
</head>
<body>
    <div class="d1"></div>
    <div class="d2"></div>
    <div class="d3"></div>
    <hr>
    <span>123456789</span>
    <span>12345678fdeoiwryofiewfiw9</span>
    <span>123456789</span>
    <hr>
    <input type="text">
    <input type="text">
    <input type="text">
    <button>按钮</button>
</body>
</html>